package com.xnyzc.lhy.task.task.didi;

import com.xnyzc.lhy.task.fegin.activity.QuartzActivityStatisticsService;
import com.xnyzc.lhy.task.fegin.didi.IDidiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author: haoyfa
 * @Date: 2019-12-29
 * @Description 活动定时任务
 */

@Slf4j
@Component("refreshCityInfo")
public class RefreshCityInfo {
    @Autowired
    private IDidiService service;

    /**
     * 刷新城市中心点位数据
     * 定时任务调用，每隔30分钟调用1次
     */
    @Scheduled(cron = "0 0/30 * * * ?")
    public void updateActivityStatusTask() {

        log.info("===========开始更新活动状态==========");
        service.refreshCityInfo();
        log.info("===========结束更新活动状态===========");
    }

}
